package com.example.result;

import lombok.Data;


@Data
public class BusinessException extends RuntimeException {

    private Boolean status;

    private Integer code;

    private String message;

    public BusinessException(Integer code, String message) {
        this.status = false;
        this.code = code;
        this.message = message;
    }

    public BusinessException(ResultCodeEnum resultCodeEnum) {
        this.status = false;
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
}
